package com.zmzncs.lmtc.module.promotion.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zmzncs.lmtc.module.promotion.pojo.month_rule_fee_scale.MonthRuleFeeScale;
import com.zmzncs.lmtc.module.promotion.pojo.month_rule_fee_scale.MonthRuleFeeScaleDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 任建波
 * @since 2020-08-12
 */
@Repository
public interface MonthRuleFeeScaleMapper extends BaseMapper<MonthRuleFeeScale> {

    /**根据停车场id查询普通月租规则收费标准*/
    List<MonthRuleFeeScaleDTO> getMonthRuleFeeScaleByParkId(@Param("parkId")Long parkId, @Param("cardType") Integer cardType);
    /**根据停车场ids查询普通月租规则收费标准*/
    List<MonthRuleFeeScaleDTO> getMonthRuleFeeScaleByParkIds(@Param("parkIdList") List<String> parkIdList);
    /**根据规则id和月租类型查询规则收费标准*/
    MonthRuleFeeScaleDTO getMonthRuleFeeScaleByRuleIdAndMonthRentType(@Param("monthRuleId") Long monthRuleId, @Param("monthRentType") Integer monthRentType, @Param("uniformRentType") Integer uniformRentType);
    /**获取多个停车场普通月租金额总和*/
    BigDecimal getMonthRuleAmountByParkIdList(@Param("parkIdList") List<Long> parkIdList, @Param("monthRentType") Integer monthRentType);

}
